<?php

?>
<script type="text/javascript">
    var fee_types = <?php echo json_encode($fee_types) ;?>;
    var program_types = <?php echo json_encode($program_types) ;?> ;
    var levels = <?php echo json_encode($levels) ;?>;
    var academic_sessions = <?php echo json_encode($academic_sessions) ;?>;
    var current_aca_ses =  <?php echo json_encode($current_aca_ses) ;?>;
</script>
<div class="page-header">
    <h3>Manage Student's Fees</h3>
</div>
<br />
<div class="" >
    <a id="import" href="<?php echo $this->Html->url(array('controller'=>'Staff','action' => 'import_student_bills')); ?>" class="btn btn-large">
        <i class="icon-arrow-up"></i> Import Billing
    </a>

    <br /><br />
    <table id="flex" style="display:none;"></table>
</div>

<div id="export_modal" class="modal hide fade">
    <form class="form form-horizontal" method="post" action="" enctype="" style="margin: 0px;">
        <div class="modal-header">
           <!-- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>-->
            <h4>Export Students Billing</h4>
        </div>
        <div class="modal-body">
            <div class="control-group" style="margin-bottom: 2px;">
                <label class="control-label">Program:</label>
                <div class="controls " id="con_program"></div>
            </div>
            <div class="control-group" style="margin-bottom: 2px;">
                <label class="control-label">Level:</label>
                <div class="controls" id="con_level" ></div>
            </div>
            <div class="control-group" style="margin-bottom: 2px;">
                <label class="control-label">Custom Search:</label>
                <div class="controls" id="con_custom_search"></div>
            </div>
            <div class="control-group" style="margin-bottom: 2px;">
                <label class="control-label">Academic Year:</label>
                <div class="controls" id="con_academic_year"></div>
            </div>
            <div class="control-group" style="text-align: center">
                <strong> <strong>
            </div>
        </div>
        <div class="modal-footer">
            <button type="button"  id="export_now_btn" class="btn btn-primary">Begin Export</button>
            <a href="#export_modal"  id="export_cancel_btn"  class="btn" data-toggle="modal">Cancel</a>
        </div>
    </form>
</div>

<form id="print-export-form" method="post" action="<?php echo $this->Html->url(array('controller' => 'Staff', 'action' => 'export_student_bills')); ?>" target="PrintExportWindow">
    <input type="hidden" name="data_page" id="data_page" value="" />
    <input type="hidden" name="data_limit" id="data_limit"  value="" />
    <input type="hidden" name="data_query_column" id="data_query_column"  value="" />
    <input type="hidden" name="data_query" id="data_query"  value="" />
    <input type="hidden" name="data_program" id="data_program"  value="" />
    <input type="hidden" name="data_level" id="data_level"  value="" />
    <input type="hidden" name="data_academic_year" id="data_academic_year"  value="" />
</form>

<input type="hidden" id="table-url" value="<?php echo $this->Html->url(array('controller' => 'Staff', 'action' => 'fees/get')); ?>" />
<input type="hidden" id="table-details-url" value="<?php echo $this->Html->url(array('controller' => 'Staff', 'action' => 'fees/load_details')); ?>" />
<input type="hidden" id="table-editable-sub-url" value="<?php echo $this->Html->url(array('controller' => 'Staff', 'action' => 'fees/save')); ?>" />
<input type="hidden" id="sub-delete-url" value="<?php echo $this->Html->url(array('controller' => 'Staff', 'action' => 'fees/sub_delete')); ?>" />
<input type="hidden" id="pre-process-export-url" value="<?php echo $this->Html->url(array('controller' => 'Staff', 'action' => 'fees/pre_process_export')); ?>" />
<input type="hidden" id="export-stu-bill-url" value="<?php echo $this->Html->url(array('controller' => 'Staff', 'action' => 'export_student_bills')); ?>" />
<input type="hidden" id="export-done-url" value="<?php echo $this->Html->url(array('controller' => 'Staff', 'action' => 'check_if_export_bill_is_done')); ?>" />
<input type="hidden" id="hidden_session_id" value="" />


<?php
    echo $this->Html->script('staff/student_fees.js');
?>